﻿<?xml version="1.0" encoding="utf-8"?>

<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="$prjsn$.Entity.Services" assembly="$prjsn$.Entity">
    <class name="Article" table="PublishingArticle" lazy="true">
        <cache usage="read-write" region="ShortTerm" />
        <id name="ID" column="ArticleId">
            <generator class="native"></generator>
        </id>

        <property not-null="true" name="Code" />
        <property not-null="true" name="Title" />
        <property not-null="true" name="Description" />
        <property not-null="true" name="Text" length="2000000" />

        <property not-null="true" name="CreationDate" />
        <property not-null="true" name="LastUpdateDate" />
        <property not-null="false" name="ReleaseDate" />

        <property not-null="true" name="IsVisible" />

        <many-to-one name="ArticleGroup" column="ArticleGroupId" fetch="join" />
        <many-to-one name="ArticleCategory" column="ArticleCategoryId" fetch="join" />
    </class>
</hibernate-mapping>